/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: Anonymous
 * License Type: Purchased
 */
package com.estate.datalogic;

import org.orm.*;
import java.io.Serializable;
import javax.persistence.*;
/**
 * ORM-Persistable Class
 */
@Entity
@Table(name="ad_types")
@org.hibernate.annotations.Proxy(lazy=false)
public class Ad_type implements Serializable {
	public Ad_type() {
	}
	
	private java.util.Set this_getSet (int key) {
		if (key == com.estate.datalogic.ORMConstants.KEY_AD_TYPE_ADVERTISEMENT) {
			return ORM_advertisement;
		}
		
		return null;
	}
	
	@Transient	
	org.orm.util.ORMAdapter _ormAdapter = new org.orm.util.AbstractORMAdapter() {
		public java.util.Set getSet(int key) {
			return this_getSet(key);
		}
		
	};
	
	@Column(name="idAd_type", nullable=false)	
	@Id	
	@GeneratedValue(generator="V9F6BA607137FFC8BFC408CCF")	
	@org.hibernate.annotations.GenericGenerator(name="V9F6BA607137FFC8BFC408CCF", strategy="increment")	
	private int idAd_type;
	
	@Column(name="type", nullable=true, length=10)	
	private String type;
	
	@Column(name="payment", nullable=true, length=8)	
	private String payment;
	
	@OneToMany(mappedBy="ad_typeidAd_type", cascade=CascadeType.ALL, targetEntity=com.estate.datalogic.Advertisement.class)	
	@org.hibernate.annotations.LazyCollection(org.hibernate.annotations.LazyCollectionOption.TRUE)	
	private java.util.Set ORM_advertisement = new java.util.HashSet();
	
	private void setIdAd_type(int value) {
		this.idAd_type = value;
	}
	
	public int getIdAd_type() {
		return idAd_type;
	}
	
	public int getORMID() {
		return getIdAd_type();
	}
	
	public void setType(String value) {
		this.type = value;
	}
	
	public String getType() {
		return type;
	}
	
	public void setPayment(String value) {
		this.payment = value;
	}
	
	public String getPayment() {
		return payment;
	}
	
	private void setORM_Advertisement(java.util.Set value) {
		this.ORM_advertisement = value;
	}
	
	private java.util.Set getORM_Advertisement() {
		return ORM_advertisement;
	}
	
	@Transient	
	public final com.estate.datalogic.AdvertisementSetCollection advertisement = new com.estate.datalogic.AdvertisementSetCollection(this, _ormAdapter, com.estate.datalogic.ORMConstants.KEY_AD_TYPE_ADVERTISEMENT, com.estate.datalogic.ORMConstants.KEY_ADVERTISEMENT_AD_TYPEIDAD_TYPE, com.estate.datalogic.ORMConstants.KEY_MUL_ONE_TO_MANY);
	
	public String toString() {
		return String.valueOf(getIdAd_type());
	}
	
}
